﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BFlatCompile.Nodes
{
	public class ApplyParam : Executable
	{
		public int Index { get; private set; }
		public MethodParam Param { get; private set; }
		public Token Token { get; private set; }

		public ApplyParam(MethodParam arg, int index, Token token)
		{
			this.Param = arg;
			this.Index = index;
			this.Token = token;
		}

		public override void ResolveCode(Class c, Dictionary<object, object> parents)
		{
			// this is already performed elsewhere for the method param default values
		}

		public override void ResolveClassToThis(Class c)
		{
			this.Param.ResolveClassToThis(c);
		}
	}
}
